import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      redirect: "/dashboard",
      component: () => import("@/view/layout/Layout"),
      children: [
        {
          path: "/dashboard",
          name: "dashboard",
          component: () => import("@/view/pages/Dashboard.vue")
        },
        {
          path: "/cfg",
          name: "cfg",
          component: () => import("@/view/pages//CFG/cfg.vue")
        },
        {
          path: "/loc",
          name: "loc",
          component: () => import("@/view/pages//LOC/loc.vue")
        },
        {
          path: "/iff",
          name: "iff",
          component: () => import("@/view/pages//IFF/iff.vue")
        },
        {
          path: "/fp",
          name: "fp",
          component: () => import("@/view/pages//FP/fp.vue")
        },
        {
          path: "/uc",
          name: "uc",
          component: () => import("@/view/pages//UC/uc.vue")
        },
        {
          path: "/OOM",
          name: "OOM",
          component: () => import("@/view/pages/OOM/oom.vue"),
          children: [
            {
              path: "ck",
              name: "OOM-ck",
              component: () => import("@/view/pages/OOM/ck.vue")
            },
            
          ]
        },
      ]
    },
    {
      path: "/custom-error",
      name: "error",
      component: () => import("@/view/pages/error/Error.vue"),
      children: [
        {
          path: "error-1",
          name: "error-1",
          component: () => import("@/view/pages/error/Error-1.vue")
        },
        {
          path: "error-2",
          name: "error-2",
          component: () => import("@/view/pages/error/Error-2.vue")
        },
        {
          path: "error-3",
          name: "error-3",
          component: () => import("@/view/pages/error/Error-3.vue")
        },
        {
          path: "error-4",
          name: "error-4",
          component: () => import("@/view/pages/error/Error-4.vue")
        },
        {
          path: "error-5",
          name: "error-5",
          component: () => import("@/view/pages/error/Error-5.vue")
        },
        {
          path: "error-6",
          name: "error-6",
          component: () => import("@/view/pages/error/Error-6.vue")
        }
      ]
    },
    {
      path: "/",
      component: () => import("@/view/pages/auth/login_pages/Login-1"),
      children: [
        {
          name: "login",
          path: "/login",
          component: () => import("@/view/pages/auth/login_pages/Login-1")
        },
        {
          name: "register",
          path: "/register",
          component: () => import("@/view/pages/auth/login_pages/Login-1")
        }
      ]
    },
    {
      path: "*",
      redirect: "/404"
    },
    {
      // the 404 route, when none of the above matches
      path: "/404",
      name: "404",
      component: () => import("@/view/pages/error/Error-1.vue")
    }
  ]
});
